<?php
/**
 * The News Model does the back-end heavy lifting for the News Controller
 */
class Homepage_Model
{
	/**
	 * Holds instance of database connection
	 */
	private $db;
		
	public function __construct()
	{
		$this->db = new MysqlImproved_Driver;
	}
	
	/**
	 * Fetches article based on supplied name
	 * 
	 * @param string $author
	 * 
	 * @return array $article
	 */
	public function get_article()
	{		
		//connect to database
		$this->db->connect();
		
		//prepare query
		$this->db->prepare
		(
			"
			SELECT
				`page`,
				`title`,
				`description`,
				`keywords`
			FROM
				`page_description`
			WHERE
				`page` = 'homepage'
			LIMIT
				1
			;
			"
		);
		
		//execute query
		$this->db->query();
		while($page_data = $this->db->fetch('array')){
			$article['page_title'] = $page_data['title'];
			$article['page_description'] = $page_data['description'];
			$article['keywords'] = $page_data['keywords'];
		}
		$article['article_title'] = "About this company";
		$article['article_content'] = 	"
				<p>
				<a class=\"lightbox\" href=\"/images/company/company.jpg\"><img class=\"left\" src=\"/images/company/about.jpg\" alt=\"company\" /></a>
				The main goal of the business for the this organization is to deliver high quality software and services. The main goal of the business is also a good relationship between us and our customers. The primary business objective of the organization is to give people around the world something extraordinary. The main goal of the business of the organization is to create a sense of community of thousands of developers, QA, user experience designers and many other people who in their daily work using the latest technologies. At the end, the primary business objective for the organization is to provide all our customers with a sense of creating something special with us.
				</p>
				<p>
				So far, all we did handle thousands of individuals. They were all happy with our services, but when we worked separately, we could not make great business projects to simplify your daily life. For now mind our customers say about us:
				</p>
				<blockquote>
				I like what you guys are up too. This kind of clever work and exposure! Keep up the fantastic works guys I’ve included you guys to my blogroll.
				</blockquote>
				<blockquote>
				Thus outsourcing can help a software development company in achieving the targets easily in lesser time with fewer resources applied. Henceforth, it allows a company to take over more projects and make a good business.
				</blockquote>
				<blockquote>
				Thus compromises are being made by the software development company in order to complete the target. If compromising is not a company’s policy then it needs to increase the hired professionals working on the project which can lead up to huge loss. You managed to avoid it. Thank you!
				</blockquote>
				<blockquote>
				One way is to recruit software developers in order to create an in-house team. Currently this is a strategy that most organizations want to avoid because of the side effects of inflation. It is understood, being participants in your courses. It has saved our company! Thank you!
				</blockquote>
				<blockquote>
				Hey I just wanted to say that I really enjoyed reading your site. You have good views, Keep up the good informative info .Good Quality and very informative site.
				</blockquote>
				<p>
				It is your feedback. This is something that shows us that we keep going in the right direction. And all that adhere to a few simple values:</p>
				
				<ul>
					<li>Although we aren't formalists, we set the bar high - we are professionals. We are able to constructively criticize and accept criticism - we know that we are concerned about the higher goals. As a result, everything here is created, it is of the highest quality.</li>
					<li>Motivation and confidence to employees who have a desire to feel a compulsion not to work. This is our working atmosphere.</li>
					<li>What can I say, you can work in many places, and that's what people do these few exceptional. It's a team spirit.</li>
					<li>There is such a thing. Without this man would feel that is in place, as if they worked in a factory on the tape - the 8h always one and the same. That something is to develop.</li>
					<li>We are proud to, what we do. That's what we do, we do with passion and commitment.</li>
				</ul>
				<p>
				It is these values ​​make it, we have become a company that today is the most chosen by individual customers. It is you we have hope in the next year, allowing still go ahead. It is only your merit.
				</p>
				<p>
				This year, we're going on. A project called Simple Life. This is a project for you. As part of this project, there will be a completely new applications that will have to simplify your daily life. And now I invite you to view other resources on this page.
				</p> 
		";
		
		return $article;
	}
	
}